<template>
    <div class="homePage">
    </div>
</template>

<script>
    import { mapGetters } from 'vuex';
    export default {
        name: "homePage",

        components: {},
        data() {
            return {}
        },
        computed: {
            ...mapGetters([
                'getNewMenuList',
            ]),
        },
        created() {
            this.handleJumpPage();
        },
        methods: {
            handleJumpPage() {
                let getPath = '';
                if (this.getNewMenuList && this.getNewMenuList.length > 0) {
                    getPath = this.getNewMenuList[0].path;
                    const listChild = this.getNewMenuList[0].children;
                    if (listChild && listChild.length > 0) {
                        getPath += `/${ listChild[0].path }`
                    }
                }
                this.$router.push(getPath);
            },
        },
        watch: {
            getNewMenuList(newVal) {
                this.handleJumpPage();
            },
        },
    }
</script>
<style scoped lang="scss">
    @function r($px) {
        @return $px/100*1rem;
    }
</style>
